public class KeyboardIO extends ProcessADT 
{
	private static int BUFFER_SIZE = 100;
	
	char[] keyboard_buffer = new char[BUFFER_SIZE];
	int buffer_index = -1;
	
	public void pushToBuffer(char the_char)
	{
			buffer_index++;
			keyboard_buffer[buffer_index] = the_char;
	}
	
	public char popFromBuffer()
	{
		char return_char = 0;
		
		if (buffer_index == -1)
		{
			//Buffer is empty
			//What should be returned?
		}
		else
		{
			return_char = keyboard_buffer[buffer_index];
			buffer_index--;
		}
		
		return return_char;
	}
	
	public char peekBuffer()
	{
		char return_char = 0;
		
		if (buffer_index == -1)
		{
			//Buffer is empty
			//What should be returned?
		}
		else
		{
			return_char = keyboard_buffer[buffer_index];
		}
		
		return keyboard_buffer[buffer_index];
	}
	
	public boolean isBufferEmpty()
	{
		boolean is_empty;
		
		if (buffer_index == -1)
		{
			is_empty = true;
		}
		else
		{
			is_empty = false;
		}
		
		return is_empty;
	}
}
